package cn.easytogo.service;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import cn.easytogo.bean.User;

public interface IUserDAO {
	/**
	 * 查询指定用户名的用户
	 * */
	public User findUserByUserName(String username) throws SQLException;
	/**
	 * 查询指定邮箱的用户
	 * */
	public User findUserByEmail(String email) throws SQLException;
	/**
	 * 查询指定用户名和密码的用户
	 * */
	public User findUserByUserNameAndPassword(String username,String password) throws SQLException;
	/**
	 * 保存用户
	 * */
	public Object insertUser(User user) throws SQLException;
	/**
	 * 根据Map条件查询相应用户
	 * */
	public List selectUsersByMap(Map map) throws SQLException;
	/**
	 * 更新用户
	 * */
	public Object updateUser(User user) throws SQLException;
	/**
	 * 删除用户
	 * */
	public int deleteUser(User user) throws SQLException;
}
